package com.exception;
//自定义异常
public class Demo02 extends Exception {
    //传递数字 大于10 抛出异常
    private int detail;

    public Demo02(int detail) {
        this.detail = detail;
    }
    //异常的打印信息
    @Override
    public String toString() {
        return "Demo02{" +
                "detail=" + detail +
                '}';
    }
}
